using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;

public class UGUIDragSupport : MonoBehaviour, IDragHandler, IBeginDragHandler, IEndDragHandler
{

    public Action<PointerEventData> onDragEvt, onBeginDragEvt, onEndDragEvt, onDropEvt;


    public void OnBeginDrag(PointerEventData eventData)
    {
        //Debug.LogFormat("OnBeginDrag:{0}", eventData.position);
        onBeginDragEvt?.Invoke(eventData);
    }

    public void OnDrag(PointerEventData eventData)
    {
        //Debug.LogFormat("OnDrag:{0}", eventData.position);
        onDragEvt?.Invoke(eventData);
    }

    public void OnEndDrag(PointerEventData eventData)
    {
        //Debug.LogFormat("OnEndDrag:{0}", eventData.position);
        onEndDragEvt?.Invoke(eventData);
    }
}